class OldmeetsController < ApplicationController
  layout 'base.html'
  # GET /Oldmeets
  # GET /oldmeets.xml
  def index
    @meets = Meet.all :conditions => ["star_at < ?", DateTime.now], :order => "created_at desc"

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @meets }
    end
  end

  # GET /meets/1
  # GET /meets/1.xml
  def show
    @meet = Meet.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @meet }
    end
  end

  # GET /meets/new
  # GET /meets/new.xml
  def new
    @meet = Meet.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @meet }
    end
  end

  # GET /meets/1/edit
  def edit
    @meet = Meet.find(params[:id])
  end

  # POST /meets
  # POST /meets.xml
  def create
    @meet = Meet.new(params[:meet])

    respond_to do |format|
      if @meet.save
        flash[:notice] = 'Meet was successfully created.'
        format.html { redirect_to(@meet) }
        format.xml  { render :xml => @meet, :status => :created, :location => @meet }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @meet.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /meets/1
  # PUT /meets/1.xml
  def update
    @meet = Meet.find(params[:id])

    respond_to do |format|
      if @meet.update_attributes(params[:meet])
        flash[:notice] = 'Meet was successfully updated.'
        format.html { redirect_to(@meet) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @meet.errors, :status => :unprocessable_entity }
      end
    end
  end

  
  def authorize

  end
end
